<?
require_once("../config/dbconn.php");require_once("../config/powercls.php");

if($act=='set'){
	unset($dataArray);
	foreach($hyrankary as $k1=>$v1){
		$dataArray["mostmin_{$k1}"]=$_POST["mostmin_{$k1}"];
		$dataArray["mostmax_{$k1}"]=$_POST["mostmax_{$k1}"];
		$dataArray["returnStaticTxl_{$k1}"]=$_POST["returnStaticTxl_{$k1}"];
		$dataArray["returnDynamicTxl_{$k1}"]=$_POST["returnDynamicTxl_{$k1}"];
    }

    $dataArray["release_property"] = $_POST["release_property"];
    $dataArray["dynamicCapping"] = $_POST["dynamicCapping"];
    $dataArray["dynamicNum"] = $_POST["dynamicNum"];
    $dataArray["redeliveryMulriple"] = $_POST["redeliveryMulriple"];
    $dataArray["heavyAwayMulriple"] = $_POST["heavyAwayMulriple"];
    $dataArray["heavyAwayRatio"] = $_POST["heavyAwayRatio"];
    $dataArray["sharingPowerAward_1"] = $_POST["sharingPowerAward_1"];
    $dataArray["sharingPowerAward_2"] = $_POST["sharingPowerAward_2"];
    $dataArray["transfer_ratio"] = $_POST["transfer_ratio"];
//	echo "<pre/>";
//    print_r($dataArray);
//    exit;
    $db->update("{$db_prefix}salaryset",$dataArray,"id=1");
	echo "<script>alert('已经更新');location.href='salary_set.php';</script>";exit();
}

$sql1="select * from {$db_prefix}salaryset where 1";
$rs1=$db->get_one($sql1);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	
}
-->
</style>

<link href="images/skin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="29" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td width="935" height="29" valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">奖金设定</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="13" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top">
		<form id="form1" name="form1" method="post" action="?act=set">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td colspan="3"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable">
                <tr>
                  <td class="left_bt2">&nbsp;&nbsp;&nbsp;&nbsp;</td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="30" colspan="3">
			  
			  <table width="100%" height="540" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>会员级别</strong></td>
				  <?
				  foreach($hyrankary as $k1=>$v1){
				  ?>
                  <td height="30" bgcolor="#FFFFFF" class="left_txt"><?=$v1?></td>
				  <?
				  }
				  ?>
                  </tr>

				<tr>
				 <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>资产范围</strong></td>
				   <?
				  foreach($hyrankary as $k1=>$v1){
				  ?>
                  <td height="30" bgcolor="#FFFFFF" class="left_txt">
                    <?if( $k1 != 6){?>

                      <input name="mostmin_<?=$k1?>" type="text"  value="<?=$rs1["mostmin_{$k1}"]?>" size="5">—
                      <input name="mostmax_<?=$k1?>" type="text" value="<?=$rs1["mostmax_{$k1}"]?>" size="5">
                  个TXL</td>
				    <?}else{?>
                          <input name="mostmin_<?=$k1?>" type="text" value="<?=$rs1["mostmin_{$k1}"]?>" size="5">以上
                      <?}?>
                <?
				  }
				  ?>
                </tr>
                <tr>
				 <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>静态奖返链比例：</strong></td>

				   <?
				  foreach($hyrankary as $k1=>$v1){
				  ?>
                  <td height="30" bgcolor="#FFFFFF" class="left_txt"><input name="returnStaticTxl_<?=$k1?>" type="text" id="returnStaticTxl_<?=$k1?>" value="<?=$rs1["returnStaticTxl_{$k1}"]?>" size="5">% &nbsp;个/日</td>
				   <?
				  }
				  ?>
                </tr>

                  <tr>
                      <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>动态奖返链比例：</strong></td>
                      <?
                      foreach($hyrankary as $k1=>$v1){
                          ?>
                          <td height="30" bgcolor="#FFFFFF" class="left_txt">
                              <input name="returnDynamicTxl_<?=$k1?>" type="text"  value="<?=$rs1["returnDynamicTxl_{$k1}"]?>" size="5">% &nbsp;个/日</td>
                          <?
                      }
                      ?>
                  </tr>
                  <tr>
                      <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>资产钱包释放：</strong></td>
                      <td height="30" colspan="6" align="left" bgcolor="#FFFFFF" class="left_txt">
                          每天释放余额的<input name="release_property" type="text" value="<?=$rs1['release_property']?>" size="5">%到释放钱包；
                      </td>
                  </tr>
                  <tr>
                      <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>动态奖规则</strong></td>

                      <td height="30" colspan="6" align="left" bgcolor="#FFFFFF" class="left_txt">每日收益封顶：1、持币量的<input name="dynamicCapping" type="text" value="<?=$rs1['dynamicCapping']?>" size="5">%；2、每日最多收益<input name="dynamicNum" type="text" value="<?=$rs1['dynamicNum']?>" size="5">个TXL；</td>
                  </tr>
                  <tr>
                      <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>重消</strong></td>

                      <td height="30" colspan="6" align="left" bgcolor="#FFFFFF" class="left_txt">累计动态收入达到投资额度的<input name="heavyAwayMulriple" type="text" value="<?=$rs1['heavyAwayMulriple']?>" size="5">倍，开始扣除每日动态收益的<input name="heavyAwayRatio" type="text" value="<?=$rs1['heavyAwayRatio']?>" size="5">%
                      作为重消金</td>
                  </tr>
                  <tr>
                      <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>复投</strong></td>

                      <td height="30" colspan="6" align="left" bgcolor="#FFFFFF" class="left_txt">累计动态收入达到投资额度的<input name="redeliveryMulriple" type="text" value="<?=$rs1['redeliveryMulriple']?>" size="5">倍，停止所有收益行为，并清空该会员的资产钱包和释放钱包；</td>
                  </tr>
                  <tr>
                      <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>分享算力奖</strong></td>

                      <td height="30" colspan="6" align="left" bgcolor="#FFFFFF" class="left_txt">每天获得直接分享人一代动态收益的<input name="sharingPowerAward_1" type="text" value="<?=$rs1['sharingPowerAward_1']?>" size="5">%，二代收益的<input name="sharingPowerAward_2" type="text" value="<?=$rs1['sharingPowerAward_2']?>" size="5">%;</td>
                  </tr>
                  <tr>
                      <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt"><strong>内部转账</strong></td>

                      <td height="30" colspan="6" align="left" bgcolor="#FFFFFF" class="left_txt">内部转账扣税<input name="transfer_ratio" type="text" value="<?=$rs1['transfer_ratio']?>" size="5">%</td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td height="30" align="right">&nbsp;</td>
              <td height="30" align="right">&nbsp;</td>
              <td height="30">&nbsp;</td>
            </tr>
            <tr>
              <td width="50%" height="30" align="right"><input type="submit" value="确定" name="B1" /></td>
              <td width="6%" height="30" align="right">&nbsp;</td>
              <td width="44%" height="30"><input type="reset" value="取消设置" name="B12" /></td>
            </tr>
            <tr>
              <td height="30" colspan="3">&nbsp;</td>
            </tr>
          </table>
		  </form>
		  </td>
      </tr>
    </table></td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
      <td height="17" valign="top" background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17" /></td>
    <td background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>

</body>
</html>
